> ## Documentation Index
> Fetch the complete documentation index at: https://sequence-0fb8d9e6-api_docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Deploy in-game Currency in Sequence Builder

> Learn how to create your own in-game currency by deploying and minting from an ERC20 contract. Understand the difference between fungible and non-fungible tokens.

## Introduction

In this guide, we'll walk you through the process of creating your own in-game currency through deploying and minting from an ERC20 contract.

Currency tokens add new and interesting dimensions to in-game economies, transactions, and player interactions to unlock and distribute value.

#### What is an ERC20 token?

An ERC20 token is a digital coin - what makes it special is that it follows a [set of rules called ERC20](https://ethereum.org/en/developers/docs/standards/tokens/erc-20/), making it easy to use in different places on the internet. These tokens often represent value or be used for specific purposes. Unlike the other common token - NFT's, these tokens are fungible.

#### Fungibility vs Non-Fungibility

This is the key distinction to understand.

Fungible tokens (like ERC20 tokens) are interchangeable, and each unit is the same as every other unit, just like dollars or euros. They can easily be split or combined into different quantities.

Non-fungible tokens (like ERC721 tokens) represent unique items with individual properties, such as digital art or collectibles. Each token is distinct and not directly exchangeable with another on a like-for-like basis.

<Warning>
  Prerequisite: Create a Project

  This guide assumes that you have already [signed up for Builder and created a Project](/solutions/builder/getting-started).
</Warning>

## Step 1: Navigate to contracts

Start by selecting your `project` in the top left and corner for what you want to create the currency for, and head to the `contracts` section and select `+ Deploy new contract`

<Frame>
  <img src="https://mintcdn.com/sequence-0fb8d9e6-api_docs/2QWO9FH9MYcin5ZY/images/collectibles/select_project_new_contract.png?fit=max&auto=format&n=2QWO9FH9MYcin5ZY&q=85&s=75fdefdfc73d5d9ab5c36f96aa5cfaf1" alt="select project and new contract" width="1906" height="820" data-path="images/collectibles/select_project_new_contract.png" />
</Frame>

## Step 2: Select Currency Token

Click `View more contracts`

<Frame>
  <img src="https://mintcdn.com/sequence-0fb8d9e6-api_docs/2QWO9FH9MYcin5ZY/images/collectibles/view_more_contracts.png?fit=max&auto=format&n=2QWO9FH9MYcin5ZY&q=85&s=6b231d1b6f02a1739aa874f789ad2c25" alt="view more contracts" width="1396" height="613" data-path="images/collectibles/view_more_contracts.png" />
</Frame>

Select the Currency Token contract and click `deploy` to deploy your Sequence audited contract

<Frame>
  <img src="https://mintcdn.com/sequence-0fb8d9e6-api_docs/2QWO9FH9MYcin5ZY/images/collectibles/select_currency_deploy.png?fit=max&auto=format&n=2QWO9FH9MYcin5ZY&q=85&s=c02dba7d07506fdaf0b508a4786e033d" alt="select currency and deploy button" width="2544" height="1175" data-path="images/collectibles/select_currency_deploy.png" />
</Frame>

## Step 3: Specify contract details

Complete the contract details by specifying a `name` and `symbol` for your contract.

<Frame>
  <img src="https://mintcdn.com/sequence-0fb8d9e6-api_docs/2QWO9FH9MYcin5ZY/images/collectibles/currency_contract_details.png?fit=max&auto=format&n=2QWO9FH9MYcin5ZY&q=85&s=45bae04dbae044476d36a86c821e9a67" alt="select currency and deploy button" width="2544" height="1175" data-path="images/collectibles/currency_contract_details.png" />
</Frame>

<Warning>
  Note:

  While you can change the `name` and `symbol` later in the builder interface where it will update across the sequence stack, popular explorers do not reindex the information, so what you put first remains
</Warning>

## Step 4: Deploy your contract

Deploy your contract from the popup window at [http://sequence.app/sign-transaction](http://sequence.app/sign-transaction), and sign the message by selecting `confirm`

<Frame>
  <img src="https://mintcdn.com/sequence-0fb8d9e6-api_docs/2QWO9FH9MYcin5ZY/images/collectibles/sign_deploy_transaction.png?fit=max&auto=format&n=2QWO9FH9MYcin5ZY&q=85&s=352115d7c9ec406b48fbcfcef72a762f" width="200" data-path="images/collectibles/sign_deploy_transaction.png" />
</Frame>

<Note>
  All testnets will be free to transact on
</Note>

## Step 5: Add a Minter Role to the contract

First start by selecting your contract you just deployed in the `contracts` section

<Frame>
  <img src="https://mintcdn.com/sequence-0fb8d9e6-api_docs/2QWO9FH9MYcin5ZY/images/collectibles/select_contract.png?fit=max&auto=format&n=2QWO9FH9MYcin5ZY&q=85&s=5875c8b005fb719779f02baa44a62012" alt="select contract" width="2560" height="1100" data-path="images/collectibles/select_contract.png" />
</Frame>

Next, head to the `Write Contract` section

<Frame>
  <img src="https://mintcdn.com/sequence-0fb8d9e6-api_docs/2QWO9FH9MYcin5ZY/images/collectibles/select_write_contract.png?fit=max&auto=format&n=2QWO9FH9MYcin5ZY&q=85&s=1771697c402ad0ebeba3d78a01ec8792" alt="write contract" width="1797" height="762" data-path="images/collectibles/select_write_contract.png" />
</Frame>

In the `grantRole` section of the write contract tab navigation, complete with the following details:

`bytes32 role`: `0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6`
`address account`: `<Wallet Address>`

Where the wallet address is just copied from the top right hand corner to be able to send tokens to your wallet

<Frame>
  <img src="https://mintcdn.com/sequence-0fb8d9e6-api_docs/2QWO9FH9MYcin5ZY/images/collectibles/copy_address.png?fit=max&auto=format&n=2QWO9FH9MYcin5ZY&q=85&s=8ae3d93582c75f824d50f33e3ba609f6" alt="copy address" width="1637" height="764" data-path="images/collectibles/copy_address.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/sequence-0fb8d9e6-api_docs/2QWO9FH9MYcin5ZY/images/collectibles/grant_role.png?fit=max&auto=format&n=2QWO9FH9MYcin5ZY&q=85&s=b7812acde4c4eee26d43e91edac9830e" alt="grant role" width="1567" height="729" data-path="images/collectibles/grant_role.png" />
</Frame>

Complete by selecting `write` and signing the transaction in the popup window, like before

With a confirmation message showing `Response Success`

<Note>
  The role string inputted is the result of `solidityPackedKeccak256("MINTER_ROLE")` in
  solidity or `ethers.solidityPackedKeccak256(ethers.toUtf8Bytes("MINTER_ROLE"))`
  in javascript
</Note>

<Tip>
  It's a typical pattern to use offchain compute like a cloudflare worker with a relayer wallet sending transactions, which would be inputted in the account field, more on how to accomplish this [here](/guides/mint-collectibles-serverless#mint-collectibles-using-a-gasless-serverless-transactions-api)
</Tip>

## Step 6: Mint tokens to your wallet address

Navigate to the `mint` card in the `Write Contract` section and input your wallet address that you would like to receive tokens to and amount of tokens in 18 decimals. So for 100 tokens you would input: `100000000000000000000`

<Frame>
  <img src="https://mintcdn.com/sequence-0fb8d9e6-api_docs/2QWO9FH9MYcin5ZY/images/collectibles/mint_currency.png?fit=max&auto=format&n=2QWO9FH9MYcin5ZY&q=85&s=6684f84c82a5b9b1a37a6d0a5c37f120" alt="mint tokens" width="1540" height="730" data-path="images/collectibles/mint_currency.png" />
</Frame>

## Step 7: Confirm your minted currency

And you're done!

You can view the transactions submitted to the blockchain for your wallet address in the `Transactions` tab navigation

<Frame>
  <img src="https://mintcdn.com/sequence-0fb8d9e6-api_docs/2QWO9FH9MYcin5ZY/images/collectibles/view_currency_transactions.png?fit=max&auto=format&n=2QWO9FH9MYcin5ZY&q=85&s=e2ab38b59b18d21c30304f7fa9afa645" alt="view currency transactions" width="1336" height="519" data-path="images/collectibles/view_currency_transactions.png" />
</Frame>
